<template>
    <div class="mobile-header">
        <div class="mobile-header-left">
            {{ props.systemName }}
        </div>
        <div class="mobile-header-right">
            <div class="mobile-header__avatar">
                <img :src="props.userAvatar" alt="">
            </div>
        </div>
    </div>
</template>

<script setup>
// 移动端头部组件
import { defineProps } from 'vue'

const props = defineProps({
    systemName: {
        type: String,
        default: ''
    },
    userAvatar: {
        type: String,
        default: ''
    }
})
</script>

<style scoped lang="scss">
.mobile-header {
    width: 100%;
    height: var(--layout-height);
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 16px;
    border-bottom: solid 1px #f0f2f5;
}

.mobile-header-left {
    font-size: 14px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.8);
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

.mobile-header__avatar {
    vertical-align: middle;
    display: inline-block;
    border-radius: 50%;
    height: 20px;
    width: 20px;

    img {
        border-radius: inherit;
        height: inherit;
        width: inherit;
    }
}
</style>